import request from '@/utils/request'

// 创建订单
export function enterOrder(data) {
  return request({
    url: '/gsOrder/createOrder',
    method: 'get',
    params: data
  })
}

// 查询服饰列表
export function listOrderItem(orderId) {
  return request({
    url: "/gsOrderItem/" + orderId,
    method: "get",/* 
    params: query, */
  });
}

// 查询订单明细
export function getOrder(orderId) {
  return request({
    url: "/gsOrder/" + orderId,
    method: "get",
    });
}

// 录入下单商品
export function enterGsClothes(orderId, clId, clSize) {
  return request({
    url: '/gsOrderItem/addItem/' + orderId + '/' + clId + '/' + clSize,
    method: 'get',
  })
}
// 录入支付方式
export function enterPayment(orderId, payWay) {
  return request({
    url: '/gsPayment/' + orderId + '/' + payWay,
    method: 'get',
  })
}

// 确认下单
export function confirmOrder(data) {
  return request({
    url: '/orderItem/confirmOrder',
    method: 'get',
    params: data
  })
}
//取消订单
export function cancelOrder(orderId) {
  return request({
    url: '/GsReturn/cancel/' + orderId,
    method: 'get',
  })
}

export function repeatPay(data){

/*   this.wechatPayMask = !this.wechatPayask
  this.codeImg= abaseUrl+'/order/getwxPay.do?orderId='+this.payTemp.orderId+'&time='+new Date().getTime();
 */}

export function refreshwechatCode(){
/*   orderId+'&time='+ new Date().getTime();
  this.codeImg = abaseUi+'/order/getWxPay.do?orderId='+this.payTemp. */
}
